﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using SevenInvaders.common;

namespace SevenInvaders.LEVEL_ADILIO
{
    class Level_Adilio
    {
        AdilioPlayer AdilioPlayer;
        Texture2D bg;

        public Level_Adilio(ContentManager content, GameWindow window)
        {

            AdilioPlayer = new AdilioPlayer(content.Load<Texture2D>("Level_Adilio/nave_b"), new Vector2(0, 250), 1, window,content);
            bg = content.Load<Texture2D>("Level_Adilio/bg");
        }

        public void Update(GameTime gameTime, KeyboardState teclado, KeyboardState teclado_anterior)
        {
            for (int i = 0; i < Shoot.list.Count; i++)
            {
                Shoot.list[i].Update(gameTime);
            }

            AdilioPlayer.Update(gameTime, teclado);
        }

        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(bg, Vector2.Zero, Color.White);
            for (int i = 0; i < Shoot.list.Count; i++)
            {
                Shoot.list[i].Draw(gameTime, spriteBatch);
            }
            AdilioPlayer.Draw(gameTime, spriteBatch);
        }

    }
}
